<?php

namespace IDock\Insurance\CHAC\Request;

use IDock\Http\RequestFormat;
use IDock\Insurance\CHAC\Response\J2ProposalRecallResponse;
use IDock\Visitor\ProposalRecallVisitor;

class J2ProposalRecallRequest extends AllCHACRequest
{
    protected $route = 'new/vhl/policyRecall';

    protected $response = J2ProposalRecallResponse::class;

    protected $urlTip = '询价单撤回';

    protected $format = RequestFormat::JSON;

    /*** @var  ProposalRecallVisitor $visitor */
    protected $visitor;

    public function generate(): array
    {
        return [
            'requestHead' => [
                'requestType' => '',
                'userName' => $this->visitor->argc['userName'] ?? '',
                'passWord' => $this->visitor->argc['passWord'] ?? '',
                'partnerCode' => $this->visitor->argc['partnerCode'] ?? '',
                'queryId' => $this->getRequestId(),
            ],
            'requestBody' => [
                'orderNumber' => $this->visitor->inquiryNo,
            ]
        ];
    }
}
